package com.graduation.cdm.funactivity;

import android.app.Application;
import android.content.Context;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

/**
 * Created by cdm on 2017/2/28.
 */

public class MyApplication extends Application {

    public static RequestQueue requestQueue;

    public static Context context;

    @Override
    public void onCreate() {
        super.onCreate();
        requestQueue = Volley.newRequestQueue(getApplicationContext());

        context = getApplicationContext();
        initImageLoader();
    }

    public static RequestQueue getRequestQueue(){
        return requestQueue;
    }

    public static Context getContext() {
        return context;
    }
    private void initImageLoader(){
        ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(this);
        ImageLoader.getInstance().init(configuration);


    }
}
